In one class of web-based attacks, a malicious user exploits the trust that is established between a victim and another entity to trigger execution of malicious requests. One such attack is the Cross-Site Request Forgery (CSRF) attack, in which a malicious user relies on the trust established between a victim and a website with which the victim has established an authenticated session.
More specifically, in a typical CSRF attack, the malicious user includes a link or script in a page that performs a function on the website with which the victim has established the authenticated session. The malicious user could include this link or script in, for example, a post to a message board or an email to the victim. Upon receipt of the page from the malicious user, the victim's web browser transmits the request to the website's server and, per standard browser operation, automatically provides the user's authentication credentials with the request. Because the remote site receives the proper credentials along with the request, it assumes that the victim submitted the request and therefore executes the requested function.
In this manner, the malicious user inherits the identity and privileges of the victim to perform undesired functions on the victim's behalf without the victim's knowledge. For example, the malicious user can trick the user into changing account information, transferring funds, purchasing an item, or performing any other function provided by the vulnerable website. CSRF attacks can therefore be very damaging to both the victim and the website that unwittingly executed the malicious request, as the attacker may perform any function provided to the victim by the vulnerable website.